/*
 * jmunit.java
 * JMUnit based test
 *
 * Created on 7/09/2012, 07:14:00 PM
 */
package hello;

import javax.microedition.lcdui.*;
import jmunit.framework.cldc10.*;


/**
 * @author OAKLAND
 */
public class jmunit extends TestCase {
    
    public jmunit() {
        //The first parameter of inherited constructor is the number of test cases
        super(0, "jmunit");
    }    
     public void testStartMIDlet() {
        System.out.println("startMIDlet");
        HelloMIDlet instance = new HelloMIDlet();
        instance.startMIDlet();
        assertEquals(instance,null);
        
    }

    /**
     * Test of resumeMIDlet method, of class HelloMIDlet.
     */

    public void testResumeMIDlet() {
        System.out.println("resumeMIDlet");
        HelloMIDlet instance = new HelloMIDlet();
        instance.resumeMIDlet();
 
    }

    /**
     * Test of switchDisplayable method, of class HelloMIDlet.
     */
  
    public void testSwitchDisplayable() {
        System.out.println("switchDisplayable");
        Alert alert = null;
        Displayable nextDisplayable = null;
        HelloMIDlet instance = new HelloMIDlet();
        instance.switchDisplayable(alert, nextDisplayable);
    }

    /**
     * Test of commandAction method, of class HelloMIDlet.
     */
    
    public void testCommandAction() {
        System.out.println("commandAction");
        Command command = null;
        Displayable displayable = null;
        HelloMIDlet instance = new HelloMIDlet();
        instance.commandAction(command, displayable);
    }

    /**
     * Test of getExitCommand method, of class HelloMIDlet.
     */
    
    public void testGetExitCommand() {
        System.out.println("getExitCommand");
        HelloMIDlet instance = new HelloMIDlet();
        Command exit =  new Command("Exit", Command.EXIT, 0);
        assertEquals(exit,instance.getExitCommand());
        
    }

    /**
     * Test of getForm method, of class HelloMIDlet.
     */

    public void testGetForm() {
        System.out.println("getForm");
        HelloMIDlet instance = new HelloMIDlet();
      Form form = new Form("Welcome", new Item[]{instance.getTextField(), instance.getTextField1(), instance.getSpacer(), instance.getStringItem1(), instance.getStringItem()});
           // form.addCommand(instance.getExitCommand());
            //form.addCommand(instance.getOkCommand());
            //form.setCommandListener(this);
        assertEquals(form,instance.getForm());
       
    }

    /**
     * Test of getStringItem method, of class HelloMIDlet.
     */
  
    public void testGetStringItem() {
        System.out.println("getStringItem");
        HelloMIDlet instance = new HelloMIDlet();
        StringItem  stringItem = new StringItem("Resultado", "...");
        assertEquals(stringItem,instance.getStringItem());
      
    }

    /**
     * Test of getTextField method, of class HelloMIDlet.
     */
  
    public void testGetTextField() {
        System.out.println("getTextField");
        HelloMIDlet instance = new HelloMIDlet();
        TextField textField = new TextField("Primer N\u00FAmero", null, 32, TextField.NUMERIC);
        assertEquals(textField,instance.getTextField());
      
    }

    /**
     * Test of getOkCommand method, of class HelloMIDlet.
     */
   
    public void testGetOkCommand() {
        System.out.println("getOkCommand");
        HelloMIDlet instance = new HelloMIDlet();
        Command okCommand = new Command("Ok", Command.OK, 0);
        assertEquals(okCommand,instance.getOkCommand());
      
    }

    /**
     * Test of getTextField1 method, of class HelloMIDlet.
     */
    
    public void testGetTextField1() {
        System.out.println("getTextField1");
        HelloMIDlet instance = new HelloMIDlet();
        TextField textField1 = new TextField("Segundo N\u00FAmero", null, 32, TextField.NUMERIC);
        assertEquals(textField1,instance.getTextField1());
       
    }

    /**
     * Test of getSpacer method, of class HelloMIDlet.
     */
  
    public void testGetSpacer() {
        System.out.println("getSpacer");
        HelloMIDlet instance = new HelloMIDlet();
        Spacer  spacer = new Spacer(16, 1);
        assertEquals(spacer, instance.getSpacer());
      
    }

    /**
     * Test of getStringItem1 method, of class HelloMIDlet.
     */
   
    public void testGetStringItem1() {
        System.out.println("getStringItem1");
        HelloMIDlet instance = new HelloMIDlet();
        StringItem stringItem1= new StringItem("Presione ok para sumar", null, Item.PLAIN);
        stringItem1.setFont(instance.getFont1());
        assertEquals(stringItem1,instance.getStringItem1());
        
      
    }

    /**
     * Test of getFont1 method, of class HelloMIDlet.
     */
    
    public void testGetFont1() {
        System.out.println("getFont1");
        HelloMIDlet instance = new HelloMIDlet();
       Font  font1 = Font.getFont(Font.FACE_PROPORTIONAL, Font.STYLE_PLAIN, Font.SIZE_SMALL);
        assertEquals(font1,instance.getFont1());
        
       
    }

    /**
     * Test of getDisplay method, of class HelloMIDlet.
     */
  
    public void testGetDisplay() {
        System.out.println("getDisplay");
        HelloMIDlet instance = new HelloMIDlet();
       assertEquals(Display.getDisplay(this),instance.getDisplay());
    }

    /**
     * Test of exitMIDlet method, of class HelloMIDlet.
     */

    public void testExitMIDlet() {
        System.out.println("exitMIDlet");
        HelloMIDlet instance = new HelloMIDlet();
        instance.exitMIDlet();
        
    }

    /**
     * Test of setResultado method, of class HelloMIDlet.
     */
    
    public void testSetResultado() {
        System.out.println("setResultado");
        HelloMIDlet instance = new HelloMIDlet();
        instance.setResultado();
    }

    /**
     * Test of startApp method, of class HelloMIDlet.
     */
    
    public void testStartApp() {
        System.out.println("startApp");
        HelloMIDlet instance = new HelloMIDlet();
        instance.startApp();
       
    }

    /**
     * Test of pauseApp method, of class HelloMIDlet.
     */
    
    public void testPauseApp() {
        System.out.println("pauseApp");
        HelloMIDlet instance = new HelloMIDlet();
        instance.pauseApp();
      
    }

    /**
     * Test of destroyApp method, of class HelloMIDlet.
     */
    
    public void testDestroyApp() {
        System.out.println("destroyApp");
        boolean unconditional = false;
        HelloMIDlet instance = new HelloMIDlet();
        instance.destroyApp(unconditional);
       
    }
    public void test(int testNumber) throws Throwable {
    }    
}
